package com.network.network;

import android.os.Handler;

/**
 * Created by Bruce on 2017/7/1.
 */

public class BaseRequest {
    public enum RequestType {
        POST, GET
    }

    private String url;
    private Handler mHandler;
    private ResponseCallback callback;
    private DataList dataList;
    private RequestType requestType;

    public BaseRequest(String url, Handler mHandler) {
        this(url,null,mHandler);
    }

    public BaseRequest(String url, DataList dataList, Handler mHandler) {
        this.dataList = dataList;
        this.mHandler = mHandler;
        this.url = url;
        this.requestType = RequestType.GET;
    }

    public RequestType getRequestType() {
        return requestType;
    }

    public void setRequestType(RequestType requestType) {
        this.requestType = requestType;
    }

    public void setCallback(ResponseCallback callback) {
        this.callback = callback;
    }

    public ResponseCallback getCallback() {
        return callback;
    }

    public DataList getDataList() {
        return dataList;
    }

    public Handler getHandler() {
        return mHandler;
    }

    public String getUrl() {
        return url;
    }
}
